<%@ page language="java" pageEncoding="utf-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib uri="/view/conf/farmtag.tld" prefix="PF"%>
<!--任务关系表单-->
<div class="easyui-layout" data-options="fit:true">
	<div class="TableTitle" data-options="region:'north',border:false">
		<span class="label label-primary"> <c:if
				test="${pageset.operateType==1}">新增${JSP_Messager_Title}记录</c:if> <c:if
				test="${pageset.operateType==2}">修改${JSP_Messager_Title}记录</c:if> <c:if
				test="${pageset.operateType==0}">浏览${JSP_Messager_Title}记录</c:if>
		</span>
	</div>
	<div data-options="region:'center'">
		<form id="dom_formTasklink">
			<input type="hidden" id="entity_id" name="id" value="${entity.id}">
			<table class="editTable">
				<tr>
					<td class="title">源节点:</td>
					<td colspan="3">${stitle}</td>
				</tr>
				<tr>
					<td class="title">目标节点:</td>
					<td colspan="3">${ttitle}</td>
				</tr>
				<tr>
					<td class="title">备注:</td>
					<td colspan="3"><input type="text" style="width: 360px;"
						class="easyui-validatebox"
						data-options="validType:[,'maxLength[64]']" id="entity_pcontent"
						name="pcontent" value="${entity.pcontent}"></td>
				</tr>
				<tr>
					<td class="title">表达式:</td>
					<td colspan="3"><textarea style="width: 360px;"
							class="easyui-validatebox"
							data-options="required:true,validType:[,'maxLength[64]']"
							id="entity_pcontent" name="expression">${entity.expression}</textarea>
						<br/>表达式通过com.googlecode.aviator引擎解析，请返回true或false
						<br/>表达式可在流程的调试模式下进行验证，表达式中可使用流程中的所有变量
						<br/>例如：PRODUCT.VESION=='1'&&PRODUCT.V_PRICE_CN=='2'
					</td>
				</tr>
			</table>
		</form>
	</div>
	<div data-options="region:'south',border:false">
		<div class="div_button" style="text-align: center; padding: 4px;">
			<a id="dom_edit_entityTasklink" href="javascript:void(0)"
				iconCls="icon-save" class="easyui-linkbutton">修改</a> <a
				id="dom_cancle_formTasklink" href="javascript:void(0)"
				iconCls="icon-cancel" class="easyui-linkbutton"
				style="color: #000000;">取消</a>
		</div>
	</div>
</div>
<script type="text/javascript">
	var submitAddActionTasklink = 'tasklink/add.do';
	var submitEditActionTasklink = 'tasklink/editExpresstion.do';
	var currentPageTypeTasklink = '${pageset.operateType}';
	var submitFormTasklink;
	$(function() {
		//表单组件对象
		submitFormTasklink = $('#dom_formTasklink').SubmitForm({
			pageType : currentPageTypeTasklink,
			grid : null,
			currentWindowId : 'winTasklinkEx'
		});
		//关闭窗口
		$('#dom_cancle_formTasklink').bind('click', function() {
			$('#winTasklinkEx').window('close');
		});
		//提交修改数据
		$('#dom_edit_entityTasklink').bind(
				'click',
				function() {
					submitFormTasklink.postSubmit(submitEditActionTasklink,
							function(flag) {
								init();
								return true;
							});
				});
	});
//-->
</script>